Code Monkey home page Code Monkey logo

oss_collab's Introduction

A brief overview

여러분들은 주식투자를 하면서 변동하는 주가에 일희일비 하고 있지 않으신가요? 혹은 기업의 가치를 보고 장기투자를 하겠다는 마음을 먹었지만 실상은 하던 과제를 제쳐두고 단타 치기에 몰두하고 있진 않은가요? Stock checker는 시시때때로 주식 차트만 바라보며 시간낭비 하는 당신이 장기투자를 할 수 있도록 도와줄 것입니다.

누구나 자신이 투자한 종목의 시세변동이 궁금할 것입니다. 다만 궁금증을 참지 못해 주식차트를 보다 보면 어느 순간 보유한 종목을 매도하거나 다른 종목을 매수하고 있는 자신을 보게 됩니다. Stock checker는 증권 사이트에 들어가지 않고도 자신이 보유하고 있는 주식의 시세와 사용자의 수익 정보와 같은 간단한 정보만 보여줌으로써 여러분들의 궁금증을 해소시켜 줄 것입니다. 또한 여러분들이 Stock checker앱에 접속한 시간을 표기하고 제한시간이 지날 경우 자동으로 닫힘으로써 당신이 시간낭비를 하지 않도록 도와줄 것입니다.
Stock checker는 주식투자를 하고 있는 소프트웨어학과 학생들을 위해 최적화되어 있습니다. 소프트웨어학과 학생 여러분, 이젠 Stock checker를 활용하여 주식에 시간 낭비 하지 마시고 마음껏 여러분들의 과제에 집중하시기 바랍니다.

Quick Start

npm install --save open
npm install -g oss-stockchecker
stock <stockName> <yes/no>

Links to resources

Installation

1. npm open

웹 브라우저를 열기 위한 npm 모듈입니다.

npm install --save open

API reference

  • npm open
  • https

Examples

Stock checker는 크게 두 부분으로 나뉩니다. 하나는 Command Line Interface이고, 나머지 하나는 Web app입니다. 우선 CLI 환경에서 Stock Checker를 이용하기 위해서는 아래의 명령어를 따라 치시면 됩니다.

npm install --save open
npm install -g oss-stockchecker
stock <stockName> <yes/no>

프로그램을 실행하면 해당 주식의 시세를 알아낼 수 있습니다. 여기서 yes를 입력하게 되면 Stock checker Web app이 열립니다.

조회하고 싶은 주식 종목의 목록을 보기 위해서는 다음의 명령어를 실행해주시면 됩니다.

stock list


Web app에 접속하면 사용자의 정보조회, 정보추가, 그리고 정보갱신을 할 수 있습니다.

1. 정보조회

위의 input box에 사용자의 이름을 입력하면 localStorage에 저장된 정보를 조회하여 사용자가 보유한 주식 종목명, 시세, 수익을 보여줍니다. 삭제를 누르면 조회된 정보 기록을 삭제할 수 있습니다.

2. 정보추가

처음 Stock checker를 이용하는 사용자라면 정보추가를 먼저 해줘야 합니다. 위의 사진에 보이는 input box에 내용을 입력하고 추가를 하면 됩니다. 빈 칸을 다 채워줘야 하며 다 채우지 않을 시에는 정보가 추가되지 않습니다.

3. 정보갱신

기존 사용자의 정보를 변경하고자 할 경우 위의 내용을 입력하고 추가하면 됩니다. 예를 들어 홍길동 사용자가 삼성전자 주식을 5주 추가로 매수했다면 차례대로 홍길동, 삼성전자, 5, 84000을 입력하면 되고, 반대로 5주를 매도했다면 홍길동, 삼성전자, -5, 87000을 입력하면 됩니다. 사용자의 정보를 삭제하고 싶을 때는 이름을 입력하고 '추가 매수량 또는 매도량'을 입력하는 부분에 0을 넣어주면 됩니다.

사진 1. 기존 정보 조회

사진 2. 정보 삭제 후 다시 정보 조회

시연 연상 링크

https://youtu.be/OybW0K935mY

Release

oss-stockchecker 1.0.9

How to contribute

Stock Checker Github Repository로 들어와서 issue를 새로 만들거나 기존에 생성된 issue에 comment를 달아주시면 됩니다. 혹은 아래의 이메일로 연락을 주시면 됩니다.

License

MIT License

Copyright (c) 2021 be9904

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Code of Conduct

  • 우리는 모든 오픈소스 참여자들이 존중되는 분위기를 만들어야 한다.
  • 우리는 모욕적인 행동, 경멸적인 농담이나 언급, 원치 않는 성적인 접근과 같이 다른 사람에게 공격적이거나 적대적인 근무환경을 조성하고 모욕적인 발언으로 해를 가하는 그 어떠한 말이나 행동을 용인하지 않는다.
  • 주류 의견에 배치되는 의견도 환영하며 우리는 그 의견을 존중할 것이다. 또한 참여자들의 피드백을 감사히 받아들일 것이다.
  • 불만을 얘기하는 사람에게 불합리한 조치는 없을 것이며, 그 어떠한 보복도 엄격하게 금지한다.

oss_collab's People

Contributors

chanuyu avatar be9904 avatar wshf253 avatar

Watchers

 avatar

oss_collab's Issues

README.md

전체 스크린샷도 추가할까요?
위치는 brief overview 밑에로 생각하고 있습니다

Back end

This feature is needed for users to interface with this web application.

class "me-auto" 적용 관련 문제

이름으로 search 버튼을 눌렀을 때 정보 옆에 x버튼이 있습니다. 제가 이걸 정보의 span에 "me-auto" 클래스를 부여했는데도 button이 오른쪽 끝에 위치하지 않고 span element 바로 다음에 위치합니다. 나중에 코드 보고 해결할 줄 아시는 분 있으시면 댓글 달아주세요

a

여기서는 일단 me-auto가 적용이 안 되어 me-4로 설정해놨습니다.

[Discussion] Frontend: 데이터 삭제

지금 제가 구현한 기능 중에 데이터 삭제를 정보갱신 부분의 매도/매수량 칸에 0을 입력하면
해당 이름의 데이터가 삭제되도록 구현해놨습니다. 이 방식 말고 따로 삭제하는 영역을 만들어서
거기에 이름을 입력하고 버튼을 누르면 삭제가 되게 하는 것이 나은지 여러분의 의견을 적어주세요

[Backend] : alert

검색할 시 일치하는 이름이 조회되지 않을 때 경고창이 뜨는 기능을 추가하면 좋을 것 같습니다.

frontend design

image

일단 정보 보여주는 칸이 더 잘 구분되게 그림자 효과를 추가했습니다.

그리고 정보 수정하는 부분의 버튼을 edit으로 바꿨습니다.

이 이외에도 디자인에 대한 아이디어가 있으면 여기다 적어주세요

Problem with require

크롤링 파일에 있는 require node 모듈이 브라우저로 실행이 안됩니다.
혹시 해결책 아시는 분은 여기에 댓글이나 링크 남겨주세요

Uncaught Error: Mismatched anonymous define() module: function(){"use strict";const t=t=>{do{t+=Math.floor(1e6Math.random())}while(document.getElementById(t));return t},e=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i="#"+i.split("#")[1]),e=i&&"#"!==i?i.trim():null}return e},i=t=>{const i=e(t);return i&&document.querySelector(i)?i:null},s=t=>{const i=e(t);return i?document.querySelector(i):null},n=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const s=Number.parseFloat(e),n=Number.parseFloat(i);return s||n?(e=e.split(",")[0],i=i.split(",")[0],1e3(Number.parseFloat(e)+Number.parseFloat(i))):0},o=t=>{t.dispatchEvent(new Event("transitionend"))},r=t=>(t[0]||t).nodeType,a=(t,e)=>{let i=!1;const s=e+5;t.addEventListener("transitionend",(function e(){i=!0,t.removeEventListener("transitionend",e)})),setTimeout(()=>{i||o(t)},s)},l=(t,e,i)=>{Object.keys(i).forEach(s=>{const n=i[s],o=e[s],a=o&&r(o)?"element":null==(l=o)?""+l:{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();var l;if(!new RegExp(n).test(a))throw new TypeError(t.toUpperCase()+": "+Option "${s}" provided type "${a}" +but expected type "${n}".)})},c=t=>{if(!t)return!1;if(t.style&&t.parentNode&&t.parentNode.style){const e=getComputedStyle(t),i=getComputedStyle(t.parentNode);return"none"!==e.display&&"none"!==i.display&&"hidden"!==e.visibility}return!1},d=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),h=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?h(t.parentNode):null},f=()=>function(){},u=t=>t.offsetHeight,p=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},g=()=>"rtl"===document.documentElement.dir,m=(t,e)=>{var i;i=()=>{const i=p();if(i){const s=i.fn[t];i.fn[t]=e.jQueryInterface,i.fn[t].Constructor=e,i.fn[t].noConflict=()=>(i.fn[t]=s,e.jQueryInterface)}},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",i):i()},=new Map;var b={set(t,e,i){.has(t)||.set(t,new Map);const s=.get(t);s.has(e)||0===s.size?s.set(e,i):console.error(Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.)},get:(t,e)=>.has(t)&&.get(t).get(e)||null,remove(t,e){if(!.has(t))return;const i=.get(t);i.delete(e),0===i.size&&_.delete(t)}};const v=/[^.](?=..).|./,y=/../,w=/::\d+$/,E={};let T=1;const A={mouseenter:"mouseover",mouseleave:"mouseout"},L=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function O(t,e){return e&&${e}::${T++}||t.uidEvent||T++}function k(t){const e=O(t);return t.uidEvent=e,E[e]=E[e]||{},E[e]}function D(t,e,i=null){const s=Object.keys(t);for(let n=0,o=s.length;n<o;n++){const o=t[s[n]];if(o.originalHandler===e&&o.delegationSelector===i)return o}return null}function x(t,e,i){const s="string"==typeof e,n=s?i:e;let o=t.replace(y,"");const r=A[o];return r&&(o=r),L.has(o)||(o=t),[s,n,o]}function C(t,e,i,s,n){if("string"!=typeof e||!t)return;i||(i=s,s=null);const[o,r,a]=x(e,i,s),l=k(t),c=l[a]||(l[a]={}),d=D(c,r,o?i:null);if(d)return void(d.oneOff=d.oneOff&&n);const h=O(r,e.replace(v,"")),f=o?function(t,e,i){return function s(n){const o=t.querySelectorAll(e);for(let{target:e}=n;e&&e!==this;e=e.parentNode)for(let r=o.length;r--;)if(o[r]===e)return n.delegateTarget=e,s.oneOff&&N.off(t,n.type,i),i.apply(e,[n]);return null}}(t,i,s):function(t,e){return function i(s){return s.delegateTarget=t,i.oneOff&&N.off(t,s.type,e),e.apply(t,[s])}}(t,i);f.delegationSelector=o?i:null,f.originalHandler=r,f.oneOff=n,f.uidEvent=h,c[h]=f,t.addEventListener(a,f,o)}function S(t,e,i,s,n){const o=D(e[i],s,n);o&&(t.removeEventListener(i,o,Boolean(n)),delete e[i][o.uidEvent])}const N={on(t,e,i,s){C(t,e,i,s,!1)},one(t,e,i,s){C(t,e,i,s,!0)},off(t,e,i,s){if("string"!=typeof e||!t)return;const[n,o,r]=x(e,i,s),a=r!==e,l=k(t),c=e.startsWith(".");if(void 0!==o){if(!l||!l[r])return;return void S(t,l,r,o,n?i:null)}c&&Object.keys(l).forEach(i=>{!function(t,e,i,s){const n=e[i]||{};Object.keys(n).forEach(o=>{if(o.includes(s)){const s=n[o];S(t,e,i,s.originalHandler,s.delegationSelector)}})}(t,l,i,e.slice(1))});const d=l[r]|require.js:110)

Front end

This feature is needed for users to interface with this web app.

EDIT* [Suggestion] Backend: Show a timer

Show a timer at the bottom of the page to show how much time the user has spent on the website.

HTML
You spent <label id="minutes">00</label>:<label id="seconds">00</label> on this page!

JS

            var minutesLabel = document.getElementById("minutes");
            var secondsLabel = document.getElementById("seconds");
            var totalSeconds = 0;
            setInterval(setTime, 1000);

            function setTime() {
                ++totalSeconds;
                secondsLabel.innerHTML = pad(totalSeconds % 60);
                minutesLabel.innerHTML = pad(parseInt(totalSeconds / 60));
            }

            function pad(val) {
                var valString = val + "";
                if (valString.length < 2) {
                    return "0" + valString;
                } else {
                    return valString;
                }
            }

snippet here

Current Problems:

  • Minutes go up infinitely (Solved: Added Hours Label)
  • Timer resets when page refreshes (UNSOLVED)

초반에 얘기가 좀 있기도 했고 갑자기 생각나서 올려봤습니다
굳이 필요한게 아니라면 내리겠습니다

스샷입니다
스크린샷 2021-05-22 오후 2 40 49

Data crawling

This feature is needed to get some information about stock from Naver Stock website

Back end: open another window

When user clicks one of the elements(names), this web app will open another window showing stock information of user corresponding to the name.

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.