Move forgewiki.command.wiki2markdown:Wiki2MarkDownCommand and everything that goes with it to a separate repo (e.g. a new SourceForge project for any non-Apache License importers)
We also need to move the forgewiki.scripts.wiki_from_trac code into the tracwikiimporter repo and do similar steps. Can also make its "import html2text" non-optional then.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
FYI forgewiki.command.wiki2markdown:Wiki2MarkDownCommand was moved to forgewiki.scripts.wiki2markdown:Wiki2Markdown script in [adaf63]
adapt it to use the ToolImporter framework
Now script reads directly from mediawiki database (MySQL) and imports that into allura. However ToolImporters are designed to fetch data through some kind of API (or parsing web pages). Do you want Wiki2Markdown fetch data from API/parsing page instead of direct connection to database?
UPD:
Figured out we can ask user for a connection string to mysql, instead of project name on this particular importer's page, but don't sure if that's what you intended.
Also, do you need a 'script' ability of Wiki2Markdown (running it from paster script)? Or we have a way to run ToolImporter as script anyway?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This importer should still use all the existing mechanisms of the script (connecting to a local database). It'll be a little different from most other importers, but that's ok. Since we're moving it to a separate repo, it won't be in Allura instances by default and won't confuse people then :)
I'd like to have all the connection details (database, attachment dir, etc) be hidden from the user. So the user would just enter the project name that they want to import from. This would mean some custom code to put together all the options since they aren't all static. (e.g. we currently run the script with these options --db_config_prefix=hostedapps.db. -a /nfs/sfa-mediawiki-content/project/f/fa/fancypants/ --db_name p_fancypants_mediawiki -n Projects -p fancypants)
We don't need to be able to run this as a script at this point. But if it makes more sense for the importer to call existing scripttask, that might be nice.
Perhaps the best thing to do at this point is create a ToolImporter that is SourceForge internal (in our forge-classic repo) that calls the existing scripttask with the proper parameters constructed. And not worry about moving the wiki2markdown files out of the allura repo at this point. I haven't looked at the code recently, so I might be forgetting something though.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We also need to move the
forgewiki.scripts.wiki_from_trac
code into thetracwikiimporter
repo and do similar steps. Can also make its "import html2text" non-optional then.Allura/allura/scripts/trac_export.py has a small dependency on GPL'd html2text also, and would be a good fit in the tracwikiimporter repo.
FYI
forgewiki.command.wiki2markdown:Wiki2MarkDownCommand
was moved toforgewiki.scripts.wiki2markdown:Wiki2Markdown
script in [adaf63]Now script reads directly from mediawiki database (MySQL) and imports that into allura. However ToolImporters are designed to fetch data through some kind of API (or parsing web pages). Do you want Wiki2Markdown fetch data from API/parsing page instead of direct connection to database?
UPD:
Figured out we can ask user for a connection string to mysql, instead of project name on this particular importer's page, but don't sure if that's what you intended.
Also, do you need a 'script' ability of Wiki2Markdown (running it from paster script)? Or we have a way to run ToolImporter as script anyway?
This importer should still use all the existing mechanisms of the script (connecting to a local database). It'll be a little different from most other importers, but that's ok. Since we're moving it to a separate repo, it won't be in Allura instances by default and won't confuse people then :)
I'd like to have all the connection details (database, attachment dir, etc) be hidden from the user. So the user would just enter the project name that they want to import from. This would mean some custom code to put together all the options since they aren't all static. (e.g. we currently run the script with these options
--db_config_prefix=hostedapps.db. -a /nfs/sfa-mediawiki-content/project/f/fa/fancypants/ --db_name p_fancypants_mediawiki -n Projects -p fancypants
)We don't need to be able to run this as a script at this point. But if it makes more sense for the importer to call existing scripttask, that might be nice.
Perhaps the best thing to do at this point is create a ToolImporter that is SourceForge internal (in our forge-classic repo) that calls the existing scripttask with the proper parameters constructed. And not worry about moving the wiki2markdown files out of the allura repo at this point. I haven't looked at the code recently, so I might be forgetting something though.
Closed #492.
Allura:
je/42cc_6484
Created project for mediawiki importer. Granted admin permissions to Dave, Tim and Cory. https://sourceforge.net/p/mediawikiimporter/git/ci/master/tree/
New options for Allura's ini for mediawiki importer:
For trac importer changes see merge request https://sourceforge.net/p/tracwikiimporter/git/merge-requests/1/