Giter Club home page Giter Club logo

geany-json-prettifier's People

Contributors

dfbadawi avatar zhgzhg 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

Watchers

 avatar  avatar  avatar

geany-json-prettifier's Issues

Error in make localinstall

There is error in make localinstall command

rm -f /home/maktub/.config/geany/plugins/jsonprettifier.so
cp -f ./jsonprettifier.so /home/maktub/.config/geany/plugins
chmod 755 /home/maktub/.config/geany/plugins/jsonprettifier.so
chmod: cannot access '/home/maktub/.config/geany/plugins/jsonprettifier.so': Not a directory
make: *** [Makefile:42: localinstall] Error 1

Geany 2.x Support

With Geany 2.0, the plugin no longer works out of the box.

jsonprettifier_x86_64.dll is not binary compatible with this release of Geany - please recompile it.

If this requires more than renaming (Geany only supports 64 bit with v2 now), could you please release a new version intended for 2.x releases but still keep the older version available for 1.x releases as well?

Indenting Preference

I think the indent preference should be taken from filetype configuration or geany configuration if available. It would also be nice to have indent preference entry.

make intall fails on Raspberry Pi [workaround]

Hello!

Just wanted to document that after successfully building the plugin with "make", "make install" fails with the following output:

rm -f "/geany/jsonprettifier.so"
rm -f /geany/jsonprettifier.*
rm -f /geany/json_prettifier.*
cp -f ./jsonprettifier.so "/geany/jsonprettifier.so"
cp: cannot create regular file '/geany/jsonprettifier.so': No such file or directory
make: *** [Makefile:38: globalinstall] Error 1

I simply created the directory and copied the file

pi@raspberrypi:~ $ sudo mkdir /usr/lib/geany
pi@raspberrypi:~ $ sudo cp ./jsonprettifier.so /usr/lib

You might want to fix it or people could just use this workaround.

Thanks!

How to use on geany now

No error output on build
so how to use on geany GUI / menu as it's not found one, ie. just as if no effect on it ?

Error on installing plugin without any modications

Package geany was not found in the pkg-config search path.
Perhaps you should add the directory containing `geany.pc'
to the PKG_CONFIG_PATH environment variable
No package 'geany' found
./geany_json_prettifier.c:33:10: fatal error: geanyplugin.h: No such file or directory
   33 | #include <geanyplugin.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:29: build] Error 1

I installed cmke from CLI
Geany isn't installed from CLI

Plugin does not work

Hi. I installed the plugin using make, make install as the instructions say.

When I try to beautify valid JSON text I get the following error:

lexical error: invalid char in json text.
              {'server.port': 10443, 'serv
(right here  -----^

It seems like r is the invalid character, but if I move the json values around, the error is still the same. Seems like the 3rd character in the first json key is allways invalid.

I've been looking for such plugin for many years and it would be awesome to get it working.

Windows Support?

Does this plugin support Geany in Windows? Is there a precompiled dll somewhere for it? I would love to use this plugin in Windows for Geany if possible!

Please let me know.

Cannot install on Ubuntu

Couldn't install this plugin.
At first I had to install 'libgtk2.0-dev' in order to run command make successfuly (this should be indicated in README)
So I installed it with command: sudo apt-get install libgtk2.0-dev

Then I had this issue when running sudo make install:

rm -f /usr/lib64/geany/jsonprettifier.*
rm -f /usr/lib64/geany/json_prettifier.*
cp -f ./jsonprettifier.so /usr/lib64/geany
cp: cannot create regular file '/usr/lib64/geany': No such file or directory
Makefile:22: recipe for target 'startinstall' failed
make: *** [startinstall] Error 1

I have no idea what to do about that error and I have to give up.. :(

HOME install and yajl availability

Currently, the Makefile tends to prepare bundled yajl and install into system which requires system access.

Maybe by default if not used by sudo or root:

  • Install in $HOME/.config/geany/plugins
  • Prepare bundled yajl only when system yajl is not available.

Plugin not installing on Geany 1.27, ubuntu 16.04

Hello! Could anyone help me to install (or activate?) this plugin.

I successfully built it, ran make localinstall. jsonprettifier.so appeared in ~/.config/geany/plugins. But nothing appeared inside the Geany app. Then I manually added the path to the glugin to active_plugins setting in geany.conf. But still cannot see it in the app.
When running geany from command line no errors are displayed.
All other plugins work normally, so plugins support itself is enabled.
What else do I miss?

./geany_json_prettifier.c:345:5: warning: format not a string literal and no format arguments [-Wformat-security]

I got an error trying to compile this plugin on Ubuntu 22.04.

git clone https://github.com/zhgzhg/Geany-JSON-Prettifier.git
cd Geany-JSON-Prettifier/
make
...
...
...
make[3]: Leaving directory '/home/rmcdonal/projects/Geany-JSON-Prettifier/lloyd-yajl-66cb08c/build'
make[2]: Leaving directory '/home/rmcdonal/projects/Geany-JSON-Prettifier/lloyd-yajl-66cb08c/build'
make[1]: Leaving directory '/home/rmcdonal/projects/Geany-JSON-Prettifier/lloyd-yajl-66cb08c'
gcc -DLOCALEDIR=\"\" -DGETTEXT_PACKAGE=\"zhgzhg\" -c ./geany_json_prettifier.c -fPIC `pkg-config --cflags geany`
./geany_json_prettifier.c: In function ‘my_json_prettify’:
./geany_json_prettifier.c:345:5: warning: format not a string literal and no format arguments [-Wformat-security]
  345 |     (const gchar*) err_str);
      |     ^
gcc geany_json_prettifier.o -o jsonprettifier.so "./lloyd-yajl-66cb08c/build/yajl-2.1.0/lib/libyajl_s.a" -shared `pkg-config --libs geany`

I am not a "c" programmer, however was able to get it to compile by modifying line 345 in file "geany_json_prettifier.c".
I then did a "make localinstall" and it seem to be working fine.

diff --git a/geany_json_prettifier.c b/geany_json_prettifier.c
index 1c29353..5648ad4 100644
--- a/geany_json_prettifier.c
+++ b/geany_json_prettifier.c
@@ -342,7 +342,7 @@ Probably improper format or odd symbols! (%s)",
                if (showErrorsInPopupWindow)
                {
                        dialogs_show_msgbox(GTK_MESSAGE_ERROR,
-                               (const gchar*) err_str);
+                               "%s",(const gchar*) err_str);
                }
 
                yajl_free_error(hand, err_str);

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.