tylerlong / slim_text

Slim Text Editor
http://slimtext.org
192 stars 43 forks source link

Open SlimText with specified file? #1

Open ZenUK opened 11 years ago

ZenUK commented 11 years ago

Just joined GitHub, due to seeing your comment on CoderWall, and unable to see how else to contact you.

My interest:-

Is there a way to open SlimText with a specified file, and via an HTML hyperlink?

I have to alter TXT files frequently on my home PC, and drudging through Windows Explorer or Notepad++ is a pain - if I can even remember where the file is.

I wish to create a direct link - once - and access any file with one click, with the files listed on HTML menus.

As a new potential user of SlimText, I note there is no 'open existing file', and the files SlimText listed are a strange list to me.

I clicked on a directory, and now cannot see how to get anywhere else!

I admit to being baffled. :-)

Having said that, SlimText looks like a good idea, and I would like to know more, please.

Best wishes, Zen

tylerlong commented 11 years ago

I wish to create a direct link - once - and access any file with one click, with the files listed on HTML menus.

Yes, it is possible and not hard at all(providing that you can program in javascript and you want to hack Slim Text). Acutally files are supposed to be opened in this way.

I clicked on a directory, and now cannot see how to get anywhere else!

Click on the breadcrumb and left panel links to navigate to anywhere of your hard disk

Having said that, SlimText looks like a good idea, and I would like to know more, please.

Feel free to ask more questions. And please read the source code of Slim Text. I also recommend you to learn Chrome extension development: http://developer.chrome.com/extensions/

ZenUK commented 11 years ago

Thanks for the swift reply, Tyler.

I have used a few Javascript functions, but writing Javascript and hacking SlimText are beyond me as yet. :-(

I am an enthusiastic amateur in C, HTML, & CSS, and learning PERL.

Navigation - I was thrown by SlimText opening on 'C:\Users\MyLocalUserName', and I moved into 'UpdatusUser' and saw filenames I found unfamiliar.

I am rather surprised I failed to notice the clickable Full Path to Current Directory, just as on Windows 7 Windows Explorer ( I was previously unaware of a bread crumb trail ).

I spent a lot of time on Borland C++ 3.1 writing DOS C programs.

And I suppose my brain read the bread crumbs as 'Full Path to File' as on Notepad++ ( i.e. not functional ).

Just been to C:\Users\UpdatusUser again, and three times ( as I reloaded SlimText ) 'File Manager Crashed' displayed

Windows Explorer had me Click a dialog box before access.

SlimText now accesses UpdatusUser with no problem.

So something WAS spooked ( not just me! ).

Presumably 'File Manager Crashed' is Windows reporting to SlimText?

Yes, I will probably have questions - but is this the correct place to ask them?

I see possibilities for SlimText, but being able to access SlimText from a hyperlink is crucial for my existing project.

Your hard work is appreciated!

tylerlong commented 11 years ago

Just been to C:\Users\UpdatusUser again, and three times ( as I reloaded SlimText ) 'File Manager Crashed' displayed

I was aware of such issues. It is most likely that you don't have full permission to open that folder. When I was developing Slim Text, I didn't pay much attention to the file/folder permission handling. It's a bug, to be fixed. I never try to edit system files which might need administration permissions(because I know that there is a bug).

Now I am full-time hired by a startup. So I don't have much time to maintain and update Slim Text. That's why I made it open source. People who have special needs can help themselves. I will try my best to provide necessary assistance.

ZenUK commented 11 years ago

Hello Tyler,

I previously failed to notice that I can email you direct.

Feel free to delete my post on Github ( assuming you can ).

:::: "It is most likely that you don't have full permission to open that folder" - yes, exactly what it was.

:::: I have just discovered your pop-up windows - love it!

And with an old DOS-style format!

Is there a limit to the number of Pop-ups one can open?

::::

I loved my Borland 3.1 IDE, but never mastered memory in C.

So I have just been passed on to PERL, and some problems I spent months struggling at without successnow take minutes. ::::

I am 55,and my mind is not as sharp as it used to be ( I burnt out on C, and have not touched it for 3 years ).

So I am just getting back into coding shape,as I wish to build a local community website. ::::

How much work do you think there isto make SlimText open a specific file via a hyperlink?

And assuming SlimText were already open, with a file loaded in the browser window, would it automatically load a pop-up window?

:::: I appreciate you are busy.

I was in business myself,and got crushed by dishonest local government,and a few other catastrophies,so I am on a spiritual journey of healing and Self-Discovery. ( which sets me thinking ... ) I feel a deep need to create a local community-building tool -a bit of an obsession, really. Local communities are being battered by the recession here, and I feel that something needs to be done.

We need a low-cost access to the market place. I was bankrupted,and live in very poor circumstances,as cash is hard to come by ( precisely why I want a local website designed by me ).

You know SlimText better than anyone.

If I suddenly found some cash,and you were willing,would you consider thinking about what it might cost mefor you to implement SlimText opening via Hyperlinks? One of the penalties of age, is that you cannot remember things as easily as when younger.

I forget where files are - even files I used 20 minutes ago ( it is part of burning-out, I guess ). This is why hard-coding a hyperlink is so important to me.

I have a lot of items to sellbut the classified advertisement systems here are awful( a lot of effort in, with almost nothing out - www.gumtree.co.uk. for example ).

I began my business career in the antiques and secondhand business,so I know how to turn junk into money,but the Marketplace here in England is very expensive to access. I want control of my own independent system, so PERL is putting me just that bit nearer,and your editor excites me.

Part of the process would involve teaching other people how to input community data - people who are not programmers,and probably not that clever.

So everything has to be - KISS - Keep It Superbly Simple.

Everything has to be Idiot-Proof.

I would need to write some instructions on how to use SlimText - things that are blindingly obvious to a skilled programmer, are ( at first ) closed doors to us lesser mortals. Perhaps I can contribute to SlimText in that way.

I feel tantalisingly close to my goal - so near, and yet so far!

Excuse my ramblings - as you might guess, I am an all-night coder.

I get up late, and do a couple of hours Tai Chi in the afternoon sunshine.

I have been doing Free-Flow Tai Chi since 1994, two years after I was tuned-in to Chi by a crystal. Life is a spiritual journey for me, and this concept is part of that journey. If you cannot do the coding yourself ( I understand you are involved in something vital to your future ),do you know someone you could perhaps guide and advise? Or guide someone I find? Let's put it this way - it would probably save me up to an hours time a week,but more importantly,I can open a file without thinking about it,removing at a stroke a good deal of stress.

Hope I am not being a nuisance!

Best wishes, Zen

tylerlong commented 11 years ago

Hello Zen,

Sorry for the late reply.

I have just discovered your pop-up windows - love it! And with an old DOS-style format! Is there a limit to the number of Pop-ups one can open?

I don't think that there is a limit. It depends on the Chrome browser

I loved my Borland 3.1 IDE, but never mastered memory in C. So I have just been passed on to PERL, and some problems I spent months struggling at without successnow take minutes.

Why not try Python or Ruby? I think they are more lovable and popular than Perl.

So I am just getting back into coding shape,as I wish to build a local community website.

If you want to build a website, mostly likely Python and Ruby are better choice than Perl. Check this Python micro webdevelopment framework: http://flask.pocoo.org/docs/ It lets you build a website in days.

How much work do you think there isto make SlimText open a specific file via a hyperlink? And assuming SlimText were already open, with a file loaded in the browser window, would it automatically load a pop-up window?

I don't quite understand what you want. When you click a file name on the left panel, acutally you "open the specific file via a hyperlink". No? A pop-up file browsing windows is currently unavailable and it is not easy to implement. I guess you want to add customized hyperlinks to the menu. If that's what you want, it is not hard.

If I suddenly found some cash,and you were willing,would you consider thinking about what it might cost mefor you to implement SlimText opening via Hyperlinks?

I'd like to help(without your money). But as I said before, I don't quite understand what you want. It's better if you can draw a mockup.

One of the penalties of age, is that you cannot remember things as easily as when younger.

55 is still young :)

Part of the process would involve teaching other people how to input community data

I would need to write some instructions on how to use SlimText

If you have a community website, then users enter data directly on your website. Why do you need to teach them Slim Text?

Finnaly, I have a good news to tell you. I've made up my mind to write a developer guide for Slim Text. Following the guide, ANY body who can program in HTML/CSS/JS can contribute to Slim Text. You can have a try then, it's not hard at all. (Maybe easier than Perl)

ZenUK commented 11 years ago

Hello Tyler,

I really do appreciate you taking the time to reply.

"Thank You!" :::: My problem is this:-

I have to build a series of HTML pages, which serve three purposes.

First, to serve the immediate local community ( say a circle of 2 kilometers ), by providing a comprehensive directory of local groups and activities, and space for new ideas.

Second, to advertise local jobs offered and wanted, maintain a list of local skills available, and assist towards local regeneration in the economic recession.

Third,to recycle used and second-hand goods, through a series of logical menus ( which can continuously expand ), so that even quite obscure things, will have a specific location.

The last one, I urgently need myself, in order to provide myself with enough to live,as I have things to sell,but no reliable local market-place.

Initially, unless I can find a way to finance a website, I plan to distribute it locally via Email, and as it generates revenue,move to internet servers.

::::

As far as links for SlimText:-

My problem hereis that I have odd files I use frequently,dotted all over my hard drive partitions. It takes too much time opening a file through Windows Explorer.

I burn mental energy trying to remember where they are, and blundering through Windows.

Logically, the answer is to group such files together in lists ( so two adjacent listed files may be on two separate partitions ), and access any file, with one or two clicks of a mouse, and burn no energy at all.

So the process becomes instinctive and painless.

:;:: I originally wondered if this could be done with:-

< a href="some_file_on_a_drive.txt" __XYZ_CODE_HERE__ >OPEN a TXT FILE in SlimText with 1 Click! I could then code my own HTML menu files.

:::: As SlimText already has a file-opening facility, in the left hand pane, could one not have an optional tab added ( say just before HELP ), which lists some simple INI text files on one's hard drive?

These files would each be a "group" of files, and on each line would be:-

the full path the filename

On selecting which "group", the left-hand pane would then display all the filenames in the LH panel, and "on-click!" would open the file, as normal.

\ see example files at the end ::::

Say there was a single file that SlimText opens on start-up, which lists all the (group) files I have listed, and displays them on the drop-down, when the Tab is clicked.

Files I am not using at the moment, could be commented out with, say, # or ;.

::::

That would solve my problem, and, presumably, add a useful facility to SlimText.

:: ::

If I can solve the "instant-link-to-open-any-file" problem, I have the potential to get others involved in maintaining the concept offline, because I can set up a easy-to-use framework.

It has to be ( relatively ) idiot-proof. ::::

Hopefully my description conveys a more accurate picture to you!

Never done a Mock-Up.

::::

I had a look at Flask, and feel a definite attraction to it.

because ... :::: I have been asked by the local community group to produce a working demo ( offline ) of my concept.

So that is my first priority.

:::: Trouble is, I keep seeing websites that spark new design ideas in my mind!

And I keep having ideas to organise my information ( which is pretty chaotic ), which are, as yet, beyond my ability to implement fast ( if at all ).

I am better at creating the vision, than coding the Toolbox.

So I get side-tracked.

And then I get frustrated, which slows my thought-processes for coding even further. A vicious circle.

If I can break the vicious circle, it will be a major step forward for me. And I want to help other people, because so many people are finding it hard to survive.

Best wishes, Zen

USER_SELECTED_FILE_GROUPS.INI # this would inform the "Tab" ( drop-down list ).

BUSINESSES.TXT GROUPS.TXTLOCAL_SERVICES.TXT SECONDHAND.TXT ZENS_CONSTANT_USE_GROUP.TXT

SOME_FILE_NOT_IN_USE_RIGHT_NOW_BUT_KEPT_READY.TXT # commented out on getline[0]

ZENS_CONSTANT_USE_GROUP.TXT # these are the kind of files I need to access instantly, to alter

Base_Menu.Html # literally, the base menu, from which my other HTML files are accessed Html_Color.Html # I keep a selection of colors I use, with example boxes, and