Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Plain Text File #133

Open
FusionX8 opened this issue May 18, 2016 · 7 comments
Open

Import Plain Text File #133

FusionX8 opened this issue May 18, 2016 · 7 comments

Comments

@FusionX8
Copy link

Hello,

When trying to import a Plain Text File - I am unable to see .txt or any file other than folders.

Granted, you can copy and paste from a text file.

@giuspen
Copy link
Owner

giuspen commented May 18, 2016

Not clear, please explain in detail and state version and operative system
On 18 May 2016 16:30, "FusionX8" notifications@github.com wrote:

Hello,

When trying to import a Plain Text File - I am unable to see .txt or any
file other than folders.

Granted, you can copy and paste from a text file.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#133

@FusionX8
Copy link
Author

FusionX8 commented May 18, 2016

CherryTree Version 0.36.9 Windows 7 x64

Inside CherryTree, Going to dropdown menu 'Import' > select 'From Plain Text File' > [Enter Name] > 'Select file'
I am unable to see or select any .txt documents. All I can see is folders.

(Maybe I am misinterpreting its use?)

@Bob3001
Copy link

Bob3001 commented Jun 1, 2016

@FusionX8 it should show you files with the extension txt and only those. So if you see nothing there are no files ending with txt. You can replace "txt" with what you like though.

@giuspen unfortunately the import of text files, even text files created with cherrytree, does not work at all. I'm trying to import shell scripts which fails, the imported text looks like when opening a binary file with more or cat on Unix.

@giuspen
Copy link
Owner

giuspen commented Jun 1, 2016

@Bob3001 can you share with me one text file whose import fails?

On 1 June 2016 at 07:41, Bob3001 notifications@github.com wrote:

@FusionX8 https://github.com/FusionX8 it should show you files with the
extension txt and only those. So if you see nothing there are no files
ending with txt. You can replace "txt" with what you like though.

@giuspen https://github.com/giuspen unfortunately the import of text
files, even text files created with cherrytree, does not work at all. I'm
trying to import shell scripts which fails, the imported text looks like
when opening a binary file with more or cat on Unix.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#133 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AGhmy-G4qcZmVs-Z4OaEgg9SPb209-Zwks5qHSmYgaJpZM4IhaLy
.

@Bob3001
Copy link

Bob3001 commented Jun 1, 2016

@giuspen Attached file was exported from CherryTree and the import fails.

Technical--Scripting--ksh--AIX_check_and_start_NFS.txt

@giuspen
Copy link
Owner

giuspen commented Jun 1, 2016

Thank you I see the problem, unfortunately the same python version under
linux and windows is behaving differently :( I will search for a solution
to this problem

On 1 June 2016 at 08:48, Bob3001 notifications@github.com wrote:

@giuspen https://github.com/giuspen Attached file was exported from
CherryTree and the import fails.

Technical--Scripting--ksh--AIX_check_and_start_NFS.txt
https://github.com/giuspen/cherrytree/files/292877/Technical--Scripting--ksh--AIX_check_and_start_NFS.txt


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#133 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AGhmy1bqnT7fy_eSW_JqStBhy-YmyZCuks5qHTlfgaJpZM4IhaLy
.

@bitboy85
Copy link

If the file is named *.txt it shows up correctly in Windows 7 x64.
The import issue is caused by support.auto_decode_str(file_content)
in imports.py you can change line 2085 "self.add_node_with_content(filepath, support.auto_decode_str(file_content))" to
if os.name == 'nt': self.add_node_with_content(filepath, file_content) else: self.add_node_with_content(filepath, support.auto_decode_str(file_content))

There is another import issue(?) from the given file name i would expect that it creates a node "Technical" and a subnode "Scripting" and a sub-subnode "ksh"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants