seijatachiis
reading a txt file and saving the paragraph as one variable
hi so ive got a txt file that looks smth like this
BOOK|The Fellowship of the Ring|1954|J.R.R. Tolkien
Fnheba, gur Qnex Ybeq, unf tngurerq gb uvz nyy gur Evatf bs Cbjre rkprcg bar - gur Bar Evat gung ehyrf gurz nyy - juvpu unf snyyra vagb gur unaqf bs gur uboovg Ovyob Onttvaf. Lbhat Sebqb Onttvaf svaqf uvzfrys snprq jvgu na vzzrafr gnfx jura Ovyob ragehfgf gur Evat gb uvf pner. Sebqb zhfg znxr n crevybhf wbhearl npebff Zvqqyr-rnegu gb gur Penpxf bs Qbbz, gurer gb qrfgebl gur Evat naq sbvy gur Qnex Ybeq va uvf rivy checbfr.
-----
SONG|Fly Me to the Moon|1964|It Might as Well be Swing|Frank Sinatra
-----
MOVIE|The Princess Bride|1987|Rob Reiner
N xvaqyl tenaqsngure fvgf qbja jvgu uvf tenaqfba naq ernqf uvz n orqgvzr fgbel. Gur fgbel vf bar gung unf orra cnffrq qbja guebhtu sebz sngure gb fba sbe trarengvbaf. Nf gur tenaqsngure ernqf gur fgbel, gur npgvba pbzrf nyvir. Gur fgbel vf n pynffvp gnyr bs ybir naq nqiragher nf gur ornhgvshy Ohggrephc vf xvqanccrq naq uryq ntnvafg ure jvyy va beqre gb zneel gur bqvbhf Cevapr Uhzcreqvapx, naq Jrfgyrl (ure puvyqubbq ornh, abj erghearq nf gur Qernq Cvengr Eboregf) nggrzcgf gb fnir ure. Ba gur jnl ur zrrgf na nppbzcyvfurq fjbeqfzna naq n uhtr, fhcre fgebat tvnag, obgu bs jubz orpbzr uvf pbzcnavbaf va uvf dhrfg. Gurl zrrg n srj onq thlf nybat gur jnl gb erfphr Ohggrephc.
-----
i know how to read the file, and i can save the book/song/movie parts correctly with their titles, years, etc. however for the book and movie summaries, im not sure how to do that. ive not added a summary constructor bc i wasnt sure (however a get/set for summary exists). every media entry is split by 5 dashes. its just getting the whole paragraph as one string (i dont think it can be a string array its just listed as "string property" ). im unsure of how to go about this
143 replies