leifeld / dna

Discourse Network Analyzer (DNA)
126 stars 41 forks source link

Problems when import files from directory #254

Closed lijush closed 1 year ago

lijush commented 1 year ago

When I use DNA 3.0.8 to import text files from a folder, two problems arise:

  1. The Regex of Date/Time works well in the window of "Import text files"(for example, 01.03.2018, 01.03.2019), but after the importing process, the date becomes the time when I import those files (for example, 2022-12-23).
  2. The Regex of Source (?<=.+?-)[a-zA-Z]+(?=-[A-Z0-9()]+.txt) does not work. All these files' names follow the format DD.MM.YYYY - Author - Source - TYPE.txt
aaa bbb

I would be grateful if you could help me with these two problems. And thank you for your continuous efforts to improve DNA.

leifeld commented 1 year ago

I think this is mostly a duplicate of #239. See there for additional advice. I fixed this recently, and the new version will be forthcoming in a few weeks. I will attach a test version here. Can you let me know if this new version fixes your problem? Thanks.

leifeld commented 1 year ago

PS: I think you could use something like this to parse the source in your case: (?<=\D - ).+(?= - .+\.txt)

lijush commented 1 year ago

Both this new version and the Regex works well. Thank you!