Converting PrivateWiki From Piki To Wikiflux
Converting PrivateWiki content from PikiPiki To WikiFlux, after coding WikiFlux For PrivateWiki. Similar to Converting Moinmoin Text To Markdown.
Feb07'2020
- finally got script running enough to generate list
- but dates are all today
- test
os.stat()
file info - mtime and ctime are now! What about atime? Blech that's "access". - derp, I was repeatedly getting
stat
on the directory not the file! - when I have a BlogBit file, do I want to set mtime=ctime, if file mtime is on the mass-date? Yep
- also set al
Category*
pages' ctime to old
Feb12: looking at migrate_convert_piki_to_mark.py
- looks like should first
- some weird entries in
pages_list.txt
- name incldeleted
,txt
, etc. - need file
page_names.txt
which is basically mapping filenames (or [[WikiWords?) to nicely spaced strings (in dbl-brackets) (which I then manually edited because of all the cases where simple logic gave ugly output). I'm less concerned about such things here, but is it easier to rip this piece out, or just find some code to generate the file, even if I don't edit it?
Feb18 - realize part of script generates page_names.txt
so do that, and figure sure go edit the entries (~3900 of them)
Mar01
- do I need graph file? Try generating that isn't working. Decide that's probably only used for generating "orphan" pages to clean up in the SmashedTogetherWords replace prettification, so skip it
- so onward to trying
convert_moin_to_mark(file)
function - failing at parsing file in
files_title_gen()
- ah, delimiter is
,
and had inserted one in a pretty-title - now converted 1 test file - omg failed if WikiWord is within parens! I must have handled that case in the MoinMoin conversion!
- see I had issue with "get an extra space" but not a complete fail!
- might do hack and mass-insert spaces inside parens, then mass-remove later? Trying that.
- still skipping those. Omg what if it's because they're orphans! Yes that was it. Unclear why I was skipping those, so changing code to go ahead and convert them.
- ok ran all. Got reasonable results. Except for links with SmashedTogetherWords in them
- most are to WikiLog - so mess is at end. Can probably fix those pretty well with regex
- what about others? Can probably do those in the same regex if careful.
- also have issue with nested wikiwords, but had that issue in WikiLog conversion too... should look for quad-square-bracket case, but that's different
- think I got lots of stuff, though still messes where there are all-caps phrases pasted from other sources - will just deal with those as I find them
- ran auto-post (after forking code) - worked!
- but most-recent update-date was Feb05 (Cornell Graduation) - so have to merge in more-recent changes
- re-process more-recent pages. Have to do all the BlogBit pages by hand, not sure why.
Mar07 get around to re-generating full WikiGraph. Realize the JavaScript widget returns the wikilog path.
Edited: | Tweet this! | Search Twitter for discussion