Git Product home page Git Product logo

joe's Introduction

joe

A .gitignore magician in your command line. Joe generates .gitignore files from the command line for you.

Features

  • Written in uncomplicated Go (Golang)
  • No installation necessary - just use the binary.
  • Stupidly easy to use
  • Supports all Github-supported .gitignore files
  • Works on Mac, Linux and (maybe) Windows
  • Supports other version control systems (.hgignore)

Installation

After install, make sure to run joe u. This will download all .gitignore files in ~/joe-data/ folder.

Option 1: Binary

joe is available for OSX (macOS), Linux and Windows.

Download the latest binary from the Releases page. It's the easiest way to get started with joe.

Make sure to add the location of the binary to your $PATH.

Option 2: From source

$ git clone [email protected]:karan/joe.git
$ cd joe/
$ chmod +x tool.sh
$ ./tool.sh build

Usage

Commands:

ls | list       list all available files
u | update      update all available gitignore files
g | generate    generate gitignore files

Basic usage

$ joe g java    # outputs .gitignore file for java to stdout

To update your .gitignore files at any time, simply run:

$ joe u

Overwrite existing .gitignore file

$ joe g java > .gitignore    # saves a new .gitignore file for java

Append to existing .gitignore file

$ joe g java >> .gitignore    # appends to an existing .gitignore file

Multiple languages

$ joe g java,node,osx > .gitignore    # saves a new .gitignore file for multiple languages

Create and append to a global .gitignore file

You can also use joe to append to a global .gitignore. These can be helpful when you want to ignore files generated by an IDE, OS, or otherwise.

$ git config --global core.excludesfile ~/.gitignore # Optional if you have not yet created a global .gitignore
$ joe g OSX,SublimeText >> ~/.gitignore

List all available files

$ joe ls    # OR `joe list`

Output:

actionscript, ada, agda, android, anjuta, appceleratortitanium, archives, archlinuxpackages, autotools, bricxcc, c, c++, cakephp, cfwheels, chefcookbook, clojure, cloud9, cmake, codeigniter, codekit, commonlisp, composer, concrete5, coq, craftcms, cvs, dart, darteditor, delphi, dm, dreamweaver, drupal, eagle, eclipse, eiffelstudio, elisp, elixir, emacs, ensime, episerver, erlang, espresso, expressionengine, extjs, fancy, finale, flexbuilder, forcedotcom, fortran, fuelphp, gcov, gitbook, go, gradle, grails, gwt, haskell, idris, igorpro, ipythonnotebook, java, jboss, jdeveloper, jekyll, jetbrains, joomla, jython, kate, kdevelop4, kohana, labview, laravel, lazarus, leiningen, lemonstand, libreoffice, lilypond, linux, lithium, lua, lyx, magento, matlab, maven, mercurial, mercury, metaprogrammingsystem, meteor, microsoftoffice, modelsim, momentics, monodevelop, nanoc, netbeans, nim, ninja, node, notepadpp, objective-c, ocaml, opa, opencart, oracleforms, osx, packer, perl, phalcon, playframework, plone, prestashop, processing, python, qooxdoo, qt, r, rails, redcar, redis, rhodesrhomobile, ros, ruby, rust, sass, sbt, scala, scons, scrivener, sdcc, seamgen, sketchup, slickedit, stella, sublimetext, sugarcrm, svn, swift, symfony, symphonycms, tags, tex, textmate, textpattern, tortoisegit, turbogears2, typo3, umbraco, unity, vagrant, vim, virtualenv, visualstudio, vvvv, waf, webmethods, windows, wordpress, xcode, xilinxise, xojo, yeoman, yii, zendframework, zephir

BONUS ROUND: Alternate version control software

Joe isn't just a generator for .gitignore files. You can use it and its output wherever a SCM is used.

$ joe g java > .hgignore

Contributing

Bug Reports & Feature Requests

Please use the issue tracker to report any bugs or file feature requests.

Developing

PRs are welcome. To begin developing, do this:

$ git clone [email protected]:karan/joe.git
$ cd joe/
$ go run *.go

tool.sh

This is a handy script that automates a lot of developing steps.

USAGE:
    $ $tool [-h|--help] COMMAND

  EXAMPLES:
    $ $tool deps      Install dependencies for joe
    $ $tool build     Build a binary
    $ $tool run       Build and run the binary

joe's People

Contributors

0xax avatar arthru avatar csu avatar domoritz avatar lorepozo avatar mkmathur avatar munrocape avatar vitorgalvao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

joe's Issues

generate .gitignore after doing something

Hi
This project is great 👍

I have a question about generating the .gitignore file after reading other configuration file.

In bower you can define a specific path where the downloaded package will be located by using .bowerrc.

Does there any use case like bower? If it does, maybe can add this function. 😄

Runtime error

Arch Linux

$ pacman -Q python
python 3.4.2-2
$ pacman -Q python-pip
python-pip 6.0.8-1
$ type joe
joe is /home/dontdieych/.local/bin/joe
$ which joe
/home/dontdieych/.local/bin/joe
$ joe
Traceback (most recent call last):
  File "/home/dontdieych/.local/bin/joe", line 9, in <module>
    load_entry_point('joe==0.0.5', 'console_scripts', 'joe')()
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 519, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2630, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2310, in load
    return self.resolve()
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2316, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/dontdieych/.local/lib/python3.4/site-packages/joe/joe.py", line 59
    print ', '.join(GITIGNORE)
             ^
SyntaxError: invalid syntax
$

[Linux] Use $XDG_DATA_HOME/joe instead of ~/.joe-data

According to the XDG Base Directory Specification, user-specific data files files should be stored in $XDG_DATA_HOME/joe, or $HOME/.local/share/joe if $XDG_DATA_HOME is not defined.

There is a single base directory relative to which user-specific data files should be written. This directory is defined by the environment variable $XDG_DATA_HOME.

This avoids cluttering the home directory and simplifies including/excluding related directories from bulk operations such as backups.

Links

Repos

joe doesn't list any "types"

rpMacPro:~ rpn$ joe ls

rpMacPro:~ rpn$

After source install. Tried to list the types of files joe would build the .gitignore for, and the list is empty. What have I missed?

brew install error

Error: undefined method homepage' for Gitignore:Class Please report this bug: https://github.com/Homebrew/homebrew/wiki/troubleshooting /usr/local/Library/Taps/karan/homebrew-karan/Formula/gitignore.rb:2:inclass:Gitignore'
/usr/local/Library/Taps/karan/homebrew-karan/Formula/gitignore.rb:1:in `

'

No longer works after update to macOS High Sierra

I get the error below when running joe on High Sierra

failed MSpanList_Insert 0x6c0000 0xd69460c89e90 0x0 0x0
fatal error: MSpanList_Insert

runtime stack:
runtime.throw(0x45f120, 0x10)
	/usr/local/go/src/runtime/panic.go:530 +0x90 fp=0x7ffeefbff110 sp=0x7ffeefbff0f8
runtime.(*mSpanList).insert(0x616d88, 0x6c0000)
	/usr/local/go/src/runtime/mheap.go:933 +0x293 fp=0x7ffeefbff140 sp=0x7ffeefbff110
runtime.(*mheap).freeSpanLocked(0x616580, 0x6c0000, 0x100, 0x0)
	/usr/local/go/src/runtime/mheap.go:809 +0x4be fp=0x7ffeefbff1a8 sp=0x7ffeefbff140
runtime.(*mheap).grow(0x616580, 0x8, 0x0)
	/usr/local/go/src/runtime/mheap.go:675 +0x2a0 fp=0x7ffeefbff200 sp=0x7ffeefbff1a8
runtime.(*mheap).allocSpanLocked(0x616580, 0x1, 0x0)
	/usr/local/go/src/runtime/mheap.go:553 +0x4e3 fp=0x7ffeefbff258 sp=0x7ffeefbff200
runtime.(*mheap).alloc_m(0x616580, 0x1, 0x15, 0x0)
	/usr/local/go/src/runtime/mheap.go:437 +0x119 fp=0x7ffeefbff288 sp=0x7ffeefbff258
runtime.(*mheap).alloc.func1()
	/usr/local/go/src/runtime/mheap.go:502 +0x41 fp=0x7ffeefbff2b8 sp=0x7ffeefbff288
runtime.systemstack(0x7ffeefbff2d8)
	/usr/local/go/src/runtime/asm_amd64.s:307 +0xab fp=0x7ffeefbff2c0 sp=0x7ffeefbff2b8
runtime.(*mheap).alloc(0x616580, 0x1, 0x10000000015, 0x1292f)
	/usr/local/go/src/runtime/mheap.go:503 +0x63 fp=0x7ffeefbff308 sp=0x7ffeefbff2c0
runtime.(*mcentral).grow(0x618180, 0x0)
	/usr/local/go/src/runtime/mcentral.go:209 +0x93 fp=0x7ffeefbff370 sp=0x7ffeefbff308
runtime.(*mcentral).cacheSpan(0x618180, 0x611078)
	/usr/local/go/src/runtime/mcentral.go:89 +0x47d fp=0x7ffeefbff3b0 sp=0x7ffeefbff370
runtime.(*mcache).refill(0x6bc000, 0x15, 0x7ffeefbff418)
	/usr/local/go/src/runtime/mcache.go:119 +0xcc fp=0x7ffeefbff3e8 sp=0x7ffeefbff3b0
runtime.mallocgc.func2()
	/usr/local/go/src/runtime/malloc.go:642 +0x2b fp=0x7ffeefbff408 sp=0x7ffeefbff3e8
runtime.systemstack(0x7ffeefbff4a8)
	/usr/local/go/src/runtime/asm_amd64.s:307 +0xab fp=0x7ffeefbff410 sp=0x7ffeefbff408
runtime.mallocgc(0x180, 0x413600, 0x0, 0x800000000)
	/usr/local/go/src/runtime/malloc.go:643 +0x869 fp=0x7ffeefbff4e8 sp=0x7ffeefbff410
runtime.newobject(0x413600, 0x6114b0)
	/usr/local/go/src/runtime/malloc.go:781 +0x42 fp=0x7ffeefbff510 sp=0x7ffeefbff4e8
runtime.malg(0x8000, 0x611860)
	/usr/local/go/src/runtime/proc.go:2634 +0x27 fp=0x7ffeefbff548 sp=0x7ffeefbff510
runtime.mpreinit(0x611e00)
	/usr/local/go/src/runtime/os1_darwin.go:140 +0x1f fp=0x7ffeefbff560 sp=0x7ffeefbff548
runtime.mcommoninit(0x611e00)
	/usr/local/go/src/runtime/proc.go:494 +0x105 fp=0x7ffeefbff5a8 sp=0x7ffeefbff560
runtime.schedinit()
	/usr/local/go/src/runtime/proc.go:434 +0x79 fp=0x7ffeefbff5f0 sp=0x7ffeefbff5a8
runtime.rt0_go(0x7ffeefbff628, 0x1, 0x7ffeefbff628, 0x0, 0x0, 0x1, 0x7ffeefbff7d8, 0x0, 0x7ffeefbff7dc, 0x7ffeefbff818, ...)
	/usr/local/go/src/runtime/asm_amd64.s:138 +0x132 fp=0x7ffeefbff5f8 sp=0x7ffeefbff5f0

Generate not working for 1.0.1

Show heal instead of generated gitignore file.
Installed as binary from https://github.com/karan/joe/releases/tag/1.0.1

mbp:fallball-spa allexx$ joe --version

▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄
▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
▀▀▀▀▀█░█▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀
▐░▌ ▐░▌ ▐░▌▐░▌
▐░▌ ▐░▌ ▐░▌▐░█▄▄▄▄▄▄▄▄▄
▐░▌ ▐░▌ ▐░▌▐░░░░░░░░░░░▌
▐░▌ ▐░▌ ▐░▌▐░█▀▀▀▀▀▀▀▀▀
▐░▌ ▐░▌ ▐░▌▐░▌
▄▄▄▄▄█░▌ ▐░█▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄▄▄
▐░░░░░░░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀
version 1.0.0

mbp:fallball-spa allexx$ joe u
Updating gitignore files..

mbp:fallball-spa allexx$ joe g vim windows sublimetext osx node jetbrains
NAME:

▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄
▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
▀▀▀▀▀█░█▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀
▐░▌ ▐░▌ ▐░▌▐░▌
▐░▌ ▐░▌ ▐░▌▐░█▄▄▄▄▄▄▄▄▄
▐░▌ ▐░▌ ▐░▌▐░░░░░░░░░░░▌
▐░▌ ▐░▌ ▐░▌▐░█▀▀▀▀▀▀▀▀▀
▐░▌ ▐░▌ ▐░▌▐░▌
▄▄▄▄▄█░▌ ▐░█▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄▄▄
▐░░░░░░░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀

  • generate .gitignore files from the command line

USAGE:
joe command [arguments...]

VERSION:
1.0.0

COMMANDS:
ls list all available files
u update all available gitignore files
g generate gitignore files

GLOBAL OPTIONS:
--help, -h show help
--version, -v print the version

Also shows version 1.0.0 expected 1.0.1

Repeatable creation of the demo gif animation

Developed a brand new tool shell-keystroke-animator for creating GIF animations for shell programs, code snippets and more. Here's a recreated version of the joe demo. Admittedly, it doesn't recreate mouse movements/selections. Instead I used view, which highlights comments, and scrolled through the longer .gitignore by glitching some noop-commands.

Good news is that it's super easy to iterate over the animation creation, so please fix it the way you please.

Input:

joe
joe ls
joe java
joe java > .gitignore
cat .gitignore
joe java python osx > .gitignore
view .gitignore
zzzzzzzzLzzzzzzzzzzzzzzzzLzzzzzzzzzzzzzzzzLzzL

Output:

joe

github/gitignore files are not composable

So I've had some issues with tools like this in the past, namely gitignore.io. They all source from github's repository of gitignores.

Here's the issue. The rules contained within a gitignore are not communative, they're read in an overwrite (final rule wins) fashion. So if you have a project that uses multiple technologies, the order of lines in a gitignore declaration is often important. Here's an example:

If you use java.gitignore then gradle.gitignore You'll have the following order of rules:

...
*.jar
...
!gradle-wrapper.jar
...

This is the correct way to declare it. You have a general rule and you have very acute exceptions after it. Gradle wants to include gradle-wrapper.jar, java wants to exclude the average jar. The problem arises when you use the gitignores in the opposite order. If you use gradle.gitignore then java.gitignore your rules will be ordered as such:

...
!gradle-wrapper.jar
...
*.jar
...

which means that all jars will be ignored, including gradle-wrapper.jar, despite the fact that you called it out to not be ignored.

So joe java gradle and joe gradle java are not the same command.

But, back to the key of this issue. github gitignores repo is not designed in a way to check that rules work together. Each file is its own standalone entity and if you're combining them, in-depth work needs to be taken to ensure your rules are correct - right now this is a manual process. I'd be exceptionally impressed if gitignores were tested in every possible combination. The issue is that any tool wanting to combine them needs to consider the actual values of each line in order to properly compose them, which may be difficult.

In the example above, there was a correct order... it might be easy to say "well just get the order right". But suppose there isn't a correct order. Say we have foo.gitignore which says:

lib/
!/bin/utility

and we have bar.gitignore which says:

bin/
!/lib/include/

Most people reading these two files could understand that the correct solution is to merge the two and probably do something like this:

bin/
lib/
!/bin/utility
!/lib/include

But simply composing the files by placing one after another will result in incorrect behavior however you do it. The other issue is that while I said that this is the correct way to compose them, can you really know that without knowing what the files are? I can promise you there are edge cases where this isn't the right way, despite it being the most reasonable assumption from the given problem.

gitignore.io

Just thought I'd mention gitignore.io in case you don't know about it. You can for example compare how the gitignore snippets compare with yours.

I'm a long-time user of it; I love the fact that I can curl and pipe that stuff easily. It's also neat to have the command with the full path a simple Ctrl+R away in zsh.

Kudos for your work, and for making joe installable via brew.

Add args for output instead of bash redirection

The current method of outputting the data into an actual .gitignore file requires a redirect to be manually specified in bash. As in, the current method is directly coupled to the bash prompt.

joe java > .gitignore

How about adding in a parameter using an internal dictionary (the data type) containing all the available options and another parameter to specify the filename (since I saw that you're supporting other versions of .gitignore)?

Here's what I'm thinking:

joe java .gitignore

or

joe java

In both cases, it would increase code portability and allow potential scripting based on joe (eg adding it into a build script by calling the necessary .gitignore generator in joe automatically). All of this should still allow easy execution on the command line as-is.

In other words, can the actual output be made a part of the script instead of being dependent on a bash redirect?

Cannot tap karan/karan: invalid syntax in tap

➜ ~ brew tap karan/karan
==> Tapping karan/karan
Cloning into '/usr/local/Homebrew/Library/Taps/karan/homebrew-karan'...
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (6/6), done.
Unpacking objects: 100% (7/7), done.
remote: Total 7 (delta 0), reused 4 (delta 0), pack-reused 0
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/karan/homebrew-karan/Formula/gitignore.rb
Calling Formula.sha1 is disabled!
Use Formula.sha256 instead.
/usr/local/Homebrew/Library/Taps/karan/homebrew-karan/Formula/gitignore.rb:4:in `class:Gitignore'
Please report this to the karan/karan tap!
Error: Cannot tap karan/karan: invalid syntax in tap!

Installed on rpm-based distro

Hi!
That tool looks great, but it seem that something is wrong.

I install it from source on CentOS 6.6. But when try joe java it outputs warning message

$ python --version
Python 2.6.6
$ joe java
joe doesn't know the following gitignores:
java
Run `joe ls` to see list of available gitignores.
[]

and when run joe ls it outputs empty line.

Any ideas?

Output piped via PowerShell on Windows into .gitignore not recognized by git

Steps to reproduce:

  1. Open PowerShell to a new empty git repo
  2. Create a file or folder (with a file in the folder) that should be ignored, such as a "bin" folder for the "visualstudio" template
  3. Run joe visualstudio > .gitignore per the documentation in README
  4. Run git add .
  5. Run git status. Note that the "bin" folder has been added as a staged change, despite being ignored.

This is due to PowerShell using some UTF-8 marks that git doesn't like but for some reason git doesn't warn you. You can see this output in Atom, with some line ending issues as well (note the presumably Unicode-related marks at the beginning of the file):

image

Note that if you run echo "bin/" > .gitignore it also doesn't work - so this is definitely a problem with either PowerShell or git, and not a problem with Joe. Also of note is that the piping works if this is run from Git Bash which is installed with Git for Windows. However, this means that either Joe should have functionality to create the .gitignore without redirecting standard output (such as a --create flag), and the documentation should at least be updated to note that redirecting output with > in PowerShell results in a file that is not usable by git. Unless there's some other way to work around this limitation in PowerShell.

Conflict with joe (text editor)

Need to come up with a new command name. Possibilities:

[ ] gitignore - no conflicts on homebrew
[ ] ignore - less preferred
[ ] gi - no conflicts on homebrew and apt. Also works like gi-joe. 💃

Makefile instead of `tool.sh`?

A makefile's purpose perfectly fits replacing tool.sh.

While tool.sh gets the job done, it is not the most convenient way.
From a programmer's point-of-view, we need to write the command parsing logic ourselves.
But from a user's - ./tool.sh something isn't more convenient than make something.

Of course, this is just nitpicking at the details. It isn't a real issue or anything.

What is the procedure for updating gitignore files?

Hi,
I have noticed that the tex template misses a number of files like .auxlock.
This has been corrected upstream in June https://github.com/github/gitignore/commits/master/TeX.gitignore if I interpret the relationship between these two projects correctly.

Is the only option now to wait for someone to update here as well? Can I make myself useful and submit a pull request with updated subtree (or submodule)?. Have you thought about a process for this?

Kind regards,
Matthias

Error when running joe u

With latest 1.0.0, when running joe u, I get the following error :

$ joe u
Updating gitignore files..
2016/04/04 09:54:01 rename /tmp/gitignore-master /home/arthur/.joe-data: invalid cross-device link

I guess that joe is trying to make a hard link from my home to my tmp dir. That won't work as this two dirs are not on the same partition...

I suggest making a real copy instead.

joe update

Why vendoring https://github.com/github/gitignore?

Why not adding a joe update command that will do a git pull --quiet --force of the gitignore repository?
The initial clone can be done automatically at first call

And why not allowing to update from another repository (with custom gitignore files (see #9))

Joe is not working when installed through brew

~ brew install karan/karan/gitignore
...
➜  ~ joe
Traceback (most recent call last):
  File "/usr/local/Cellar/gitignore/0.0.7/libexec/bin/joe", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2793, in <module>
    working_set.require(__requires__)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 673, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 576, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: gitdb>=0.6.4

Add some tests

We really should add some tests that can test different paths, different combinations of gitignores and exceptions.

Python 3 support: Version 0.0.5

The problem appears to be solved in Version 0.0.6 but the PyPi version is still 0.0.5. The main problem is the lack of parenthesis surrounding print statements which are a necessity for Python 3 as print is a function in Python 3.

Using from __future__ import print_function should work and all print statements must be replaced with print()

a

Consider adding custom gitignore files too

Maybe platform specific?

Mac needs to have .DS_Store for example. Some cloud platforms have their own files that need to be ignored. Editors have some (like #3).

How should be structure this?

I'm thinking this:

joe/
---- data/
-------- gitignore/    # submodule from github/gitignore
-------- custom/      # our own custom files

Seems good? Anyone have a good list of such files we can add?

Generated sections don't always end with newline

Steps to reproduce:

  1. joe g emacs,java

Expected:

  • Cleanly generated .gitignore for Emacs and Java, e.g.
#### joe made this: http://goel.io/joe
#### emacs ####
(...)
# projectiles files
.projectile

#### java ####
*.class
(...)

Actual:

  • Generated emacs .gitignore doesn't end with newline, producing:
#### joe made this: http://goel.io/joe
#### emacs ####
(...)
# projectiles files
.projectile#### java ####
*.class
(...)

no OS X template

There is no template for Mac OS X, e.g. ignore .DS_store files.

Error running joe -u on windows

C:\Work\Project>joe u
Updating gitignore files..
2017/02/16 16:22:20 open /tmp/master.zip: The system cannot find the path specified.

The reason is the my (and most) windows machines do not have a /tmp folder.
Easy enough to work around (by creating the c:\tmp folder).
But, a fix would be to change any hard coded references to /tmp to use os.TempDir() so it finds the correct temp folder for the O/S.

Thanks for such a great tool.

joe-data error: cannot find the file

I'm using joe on Git for Windows 2.13 and I get the following error:

$ joe g visualstudio,csharp
2017/07/10 09:18:57 open E:\Google Drive\Development\Home\Robert/.joe-data: The system cannot find the file specified.

All I did was drop joe.exe on my PATH and ran it from git-bash.exe. Why isn't this working?

no gitignore on ubuntu using install

System :
Distributor ID: Ubuntu
Description: Ubuntu 15.04
Release: 15.04
Codename: vivid

Installation :
sudo apt-get install python-setuptools git ;
cd $(mktemp -d) ; git clone https://github.com/karan/joe.git && cd joe && sudo python setup.py install

invocation :
joe ls ; echo "sudo";sudo joe ls

sudo

(two blank lines)

Utilise stderr for error reporting in "generate"

Right now joe generates all output to stdout, even error reports. So, if you run it like this:

joe g osX >> .gitignore

You'll end up with invalid .gitignore file. The most common practice for this is to utilise stderr stream, so that the error isn't redirected to the file and is written to the terminal instead. And nothing gets written to the file.

github pages are outdated

There are a lot of changes since the last documentation on github-pages release.

For example:
2017-02-11 0 28 59
And
2017-02-11 0 28 40

Incorrect output on broken pipe

I'm currently running joe-0.0.6. When you pipe joe to a command that doesn't exist, you get the following behavior:

$ joe java | hello
-bash: hello: command not found
close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr

I looked into this behavior, and it turns out to be a bug in the Python 2.7 interpreter: the interpreter is not reporting an exception when failing to flush stdout. More about this can be found here and here.

I believe this behavior can be fixed by simply adding sys.stdout.flush() to the bottom of the main method.

pip install not working

fjsj$ sudo pip install joe
Collecting joe
  Downloading joe-0.0.3.tar.gz
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-gONlfD/joe/setup.py", line 10, in <module>
        long_description=open('README.md').read(),
    IOError: [Errno 2] No such file or directory: 'README.md'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

      File "<string>", line 20, in <module>

      File "/tmp/pip-build-gONlfD/joe/setup.py", line 10, in <module>

        long_description=open('README.md').read(),

    IOError: [Errno 2] No such file or directory: 'README.md'

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-gONlfD/joe

Shell Auto-Completion / Search feature

When I do

% joe ls

it just prints a blob of all possible joe .gitignore files. _It's not very readable_. If it had auto-completion, we could press tab midway and it would list relevant options for selection:

% joe vi<tab press>
vim          virtualenv          visualstudio

This makes it easier for the user to go through possible options without going insane reading a huge list of names separated by a comma. Or another option would be to create a search feature, so the user can search for relevant options:

% joe search vi
labview
vim
virtualenv
visualstudio

Right now, I'm doing this to filter the list:

% joe ls | awk '{split($0,a,", "); for (var in a) print a[var]}' | grep -i vi
labview
vim
virtualenv
visualstudio

'joe ls' is now outputting incorrect and incomplete information

Now that data/ is under version control, the output of joe ls includes the .git file and neglects all of the .gitignore files within data/Global.

$ joe ls
.git, actionscript, ada, agda, android, appceleratortitanium, archlinuxpackages, autotools, c++, c, cakephp, cfwheels, chefcookbook, clojure, cmake, codeigniter, commonlisp, composer, concrete5, contributing.md, coq, craftcms, dart, delphi, dm, drupal, eagle, elisp, elixir, episerver, erlang, expressionengine, extjs, fancy, finale, forcedotcom, fortran, fuelphp, gcov, gitbook, go, gradle, grails, gwt, haskell, idris, igorpro, java, jboss, jekyll, joomla, jython, kohana, labview, laravel, leiningen, lemonstand, license, lilypond, lithium, lua, magento, maven, mercury, metaprogrammingsystem, meteor, nanoc, nim, node, objective-c, ocaml, opa, opencart, oracleforms, packer, perl, phalcon, playframework, plone, prestashop, processing, python, qooxdoo, qt, r, rails, readme.md, rhodesrhomobile, ros, ruby, rust, sass, scala, scons, scrivener, sdcc, seamgen, sketchup, stella, sugarcrm, swift, symfony, symphonycms, tex, textpattern, turbogears2, typo3, umbraco, unity, visualstudio, vvvv, waf, wordpress, xojo, yeoman, yii, zendframework, zephir

Nested .idea directories created by JetBrains Rider IDE not recognized

The JetBrains Rider IDE creates nested .idea configuration directories under the project name:

.idea
└── .idea.MyProject
    ├── .idea
    │   ├── .name
    │   ├── modules.xml
    │   ├── vcs.xml
    │   └── workspace.xml
    └── riderModule.iml

Files in the inner .idea/.idea.MyProject/.idea aren't caught by the .idea lines in the joe-generated JetBrains .gitignore, so (e.g.) .idea/.idea.MyProject/.idea/workspace.xml gets added. I worked around this by prefacing the .idea lines in my .gitignore with **, thus:

# User-specific stuff:
**/.idea/workspace.xml
**/.idea/tasks.xml
**/.idea/dictionaries
**/.idea/vcs.xml
**/.idea/jsLibraryMappings.xml

# Sensitive or high-churn files:
**/.idea/dataSources.ids
**/.idea/dataSources.xml
**/.idea/dataSources.local.xml
**/.idea/sqlDataSources.xml
**/.idea/dynamic.xml
**/.idea/uiDesigner.xml

# Gradle:
**/.idea/gradle.xml
**/.idea/libraries

# Mongo Explorer plugin:
**/.idea/mongoSettings.xml

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.