https://github.com/justinfx/gofileseq
A library for parsing/building frame ranges and sequences. A port of the python fileseq library, for Go and C++(https://github.com/justinfx/fileseq)
https://github.com/justinfx/gofileseq
cpp fileseq filesystem go golang ranges vfx
Last synced: 3 months ago
JSON representation
A library for parsing/building frame ranges and sequences. A port of the python fileseq library, for Go and C++(https://github.com/justinfx/fileseq)
- Host: GitHub
- URL: https://github.com/justinfx/gofileseq
- Owner: justinfx
- License: mit
- Created: 2014-11-04T07:18:10.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2026-03-07T22:22:24.000Z (4 months ago)
- Last Synced: 2026-03-08T02:50:39.163Z (4 months ago)
- Topics: cpp, fileseq, filesystem, go, golang, ranges, vfx
- Language: C++
- Homepage:
- Size: 8.63 MB
- Stars: 55
- Watchers: 2
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES
- License: LICENSE
Awesome Lists containing this project
- awesome-cg-vfx-pipeline - gofileseq - A Golang port of the library above. (Libraries / File path)
README

=======
[](https://badge.fury.io/go/github.com%2Fjustinfx%2Fgofileseq)
[](https://godoc.org/github.com/justinfx/gofileseq)
[](https://github.com/justinfx/gofileseq/actions?query=workflow%3A%22Build+and+Deploy%22)
[](https://goreportcard.com/report/github.com/justinfx/gofileseq)
A Go language library for parsing file sequence strings commonly
used in VFX and animation applications.
Ported from the original fileseq Python library:
https://github.com/justinfx/fileseq
For C++, see [C++ Support](#c-support)
Frame Range Shorthand
---------------------
Support for:
* Standard: 1-10
* Comma Delimted: 1-10,10-20
* Chunked: 1-100x5
* Filled: 1-100y5
* Staggered: 1-100:3 (1-100x3, 1-100x2, 1-100)
* Negative frame numbers: -10-100
* Padding: #=4 padded, @=single pad
* Printf Syntax Padding: %04d=4 padded, %01d=1 padded
* Houdini Syntax Padding: $F4=4 padding, $F=1 padded
* Udim Syntax Padding: or %(UDIM)d, always 4 padded
Sequence Formats
----------------
Sequences of files are expected to follow a pattern similar to:
* /path/to/some/file_foo.0100.exr
* /path/to/some/file_foo.1-100#.jpg
* /path/to/some/file_foo.1-100@@@.tif
* /path/to/some/file_foo.1-100%03d.tif
* /path/to/some/file_foo.1-100$F3.tif
* /path/to/some/file_foo.1-100.tif
* /path/to/some/file_foo.1-100%(UDIM)d.tif
Install
-------
```bash
go get github.com/justinfx/gofileseq/v3
```
Also included is a [`seqls`](https://github.com/justinfx/gofileseq/tree/master/cmd/seqls) tool, which uses `gofileseq` to produce an executable, used for listing sequences on the filesystem:
And [`seqinfo`](https://github.com/justinfx/gofileseq/tree/master/cmd/seqinfo) tool, which can print plain-text or json parsed information about one or more sequence strings.
Download the latest [binary release](https://github.com/justinfx/gofileseq/releases/latest)
Or install from source:
```bash
go get github.com/justinfx/gofileseq/v3/cmd/seqls
seql some/images
# some/images/file_foo.1-100@@@.tif
```
Development
-----------
The file sequence parser is built using an [ANTLR4](https://www.antlr.org/) grammar defined in `grammar/fileseq.g4`.
When the grammar file is modified, the parser must be regenerated and committed:
```bash
# Regenerate parser from grammar
go generate ./...
# Or directly via make
cd grammar && make generate-go
```
**Requirements:** Java runtime (for ANTLR code generation)
If Java is not in a default system location, specify the path:
```bash
# Using go generate
JAVA=/path/to/java go generate ./...
# Using make directly
cd grammar && make JAVA=/path/to/java generate-go
```
**Alternative:** Use Docker (no Java required):
```bash
cd grammar && make generate-go-docker
```
C++ Support
------------
A C++ pure port of gofileseq is also available in the [cpp](https://github.com/justinfx/gofileseq/tree/master/cpp) dir