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

PureBasic: Add ".pbf" and ".pbp" Extensions #3926

Closed
wants to merge 2 commits into from

Conversation

tajmone
Copy link

@tajmone tajmone commented Dec 1, 2017

Add PureBasic's .pbf and .pbp file extensions:

  • .pbf to "PureBasic" setcion
  • .pbp to "XML" setcion

*.pbf files are "form files" created with PureBasic IDE's integrated Form Designer. Form files' contents are just PureBasic sourcecode:

http://www.purebasic.com/documentation/reference/ide_form.html

*.pbp files are PureBasic project files, created by the PureBasic IDE. They are just XML files:

http://www.purebasic.com/documentation/reference/ide_projects.html
http://www.purebasic.com/documentation/reference/ide_tools.html

Add PureBasic's `.pbf` and `.pbp` file extensions:

- `.pbf` to "PureBasic" setcion
- `.pbp` to "XML" setcion

`*.pbf` files are "form files" created with PureBasic IDE's integrated Form Designer. Form files' contents are just PureBasic sourcecode:

http://www.purebasic.com/documentation/reference/ide_form.html

`*.pbp` files are PureBasic project files, created by the PureBasic IDE. They are just XML files:

http://www.purebasic.com/documentation/reference/ide_projects.html
http://www.purebasic.com/documentation/reference/ide_tools.html
@pchaigno
Copy link
Contributor

pchaigno commented Dec 2, 2017

Please have a look at the guidelines to add support for a new extension to Linguist. In particular, you'll need to link to a GitHub search result page showing in-the-wild usage, for each extension.

This example provides samples of a project file (`*.pbp`) and a form file  (`*.pbf`)
@tajmone
Copy link
Author

tajmone commented Dec 2, 2017

Ok, I've created an example project in "samples" that provides sample files for both ".pbp" (XML) and ".pbf" (PureBasic code) files.

I'm not sure about the search results links requirement, the guidelines are quite terse about it. The best I've managed is this:

https://github.com/search?q=extension%3Apbf+extension%3Apbp+fork%3Atrue+label%3Apurebasic+NOT+nothack&type=Code&utf8=%E2%9C%93

... but search result include some false positives for .pbp extension (some "*.PBP" binary files), even though I specified in advanced search to filter with a "purebasic" label (which, by the way, probably reduces drastically the result findings).

@lildude
Copy link
Member

lildude commented Apr 6, 2018

First off, thanks for the contribution. I've taken a quick look at the general structure of .pbf files that I can find on GitHub that aren't binary files and they all seem to share a common use of the word event With this in mind, I created a search for this extension using this keyword and found very few results: https://github.com/search?utf8=%E2%9C%93&q=extension%3Apbf+Event+NOT+nothack&type=Code

I performed a similar search for pbp, which is much easier as it's XML and also got very few results: https://github.com/search?utf8=%E2%9C%93&q=extension%3Apbp+xml+NOT+nothack&type=Code

As per our contributing guidelines, we really need each extension individually to be used in hundreds of repositories. Neither extension meets this requirement. Accordingly, we can't accept this PR at this stage and I've labeled this PR accordingly.

Additionally, the failures in this PR are legit failures that need to be addressed.

The two .cfg files should probably also be removed from this PR as they look more like editor configuration files than files written in PureBasic.

@tajmone
Copy link
Author

tajmone commented Apr 6, 2018

As per our contributing guidelines, we really need each extension individually to be used in hundreds of repositories. Neither extension meets this requirement.

I understand your point, but as far as the *.pbf extension goes, it's just an alternative extension to the default *.pb extensions (which is already registered with Linguist). The *.pb being the base extension, the others are just alternative conventions, where *.pbi simply indicates that it's an "include" file (that doesn't do anything by itself), and the f in *.pbf indicates that is a "form" file (ie: autogenerated by the IDE's form manager).

Conventions aside, they are just plain PureBasic syntax files, using the same syntax.

PureBasic is a bit of a niche language, add to that that the *.pbf extension is not commonly used in many projects, than chances are that currently GitHub won't be hosting enough search results as required in the specifications you pointed out.

I'd like though to make a point of the fact that PureBasic is a 20 years old language (started out in 1998, and underwent major updates). It originally run on Amiga (the Amiga version being open source now), and currently runs on Windows, Linux and macOS. Maybe the sheer fact that it has been around for 20 years could be taken into account in this case.

https://en.wikipedia.org/wiki/PureBasic

As said, I'm only trying to register on Linguist variations of what is an already present extension — I've provided links to the official documentation in support of that.

The two .cfg files should probably also be removed from this PR as they look more like editor configuration files than files written in PureBasic.

Correct; I just added them for the sake of completness — basically, I've put in this PR all the manual settings that I usually put in the .gitattribures file of a PureBasic project. Usually, in my Linguist settings I configure the *.cgf and *.pbp extensions as auto-generated.

@lildude
Copy link
Member

lildude commented Apr 6, 2018

I understand your point, but as far as the *.pbf extension goes, it's just an alternative extension to the default *.pb extensions (which is already registered with Linguist).

They may be, but we require all extensions meet these requirements, regardless of how popular the language or another extension of that language is.

@tajmone
Copy link
Author

tajmone commented Apr 7, 2018

They may be, but we require all extensions meet these requirements...

I understand. What should we do then, should I close the pull request?

Can I then safely delete my PR branch and/or my fork of Linguist?

@lildude
Copy link
Member

lildude commented Apr 8, 2018

I understand. What should we do then, should I close the pull request?

Can I then safely delete my PR branch and/or my fork of Linguist?

It's entirely up to you. You can keep the PR open and check up on the popularity over time, but then you can't delete your fork. Or close the PR, delete your fork and keep an eye on the popularity and when things become more popular open a new PR.

@tajmone
Copy link
Author

tajmone commented Apr 8, 2018

Thanks for the tips!

You can keep the PR open and check up on the popularity over time

I'll do that, in the last 2 years members of PureBasic's community have started moving their projects on GitHub, and their number is growing. Hopefully, the pending target might be reached in the course of time.

(I'm personally involved in helping a project that is trying to gather on GitHub all the loose projects that have been scattered on various websites in the years, and asking authors on the PB Forums to join efforts with us and try to create a centralized and collaborative archive).

@pchaigno
Copy link
Contributor

pchaigno commented Aug 4, 2018

Closing in favor of #4219. We'll monitor the popularity of the extensions there.

If you have improved search queries compared to those I used in #4219, please post them here and I'll update #4219.

@pchaigno pchaigno closed this Aug 4, 2018
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants